package cn.roadtrip.mtravelbusinessmodule.mvc.tuortravel;

import cn.roadtrip.mtravelbusinessmodule.bs.tuorgroup.TourTravelImpl;
import cn.roadtrip.utilmodule.util.DataBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/tuortravel")
public class TuorTravelController {

    @Autowired
    private TourTravelImpl tourTravelImpl;

    /**
     * 创建人创建团
     *
     * @param model
     * @return
     */
    @RequestMapping("/createTuorTravelLineGroup")
    public DataBean createTuorTravelLineGroup(
            @RequestBody TourTravelImpl.Model_createTuorGroup model) {
        return tourTravelImpl.createTuorTravelLineGroup(model);
    }


    /**
     * 预算费用  -- 报名第一步的操作
     *
     * @param model
     * @return
     */
    @RequestMapping("/provideTuorTravelLineOrderBudget")
    public DataBean provideTuorTravelLineOrderBudget(
            @RequestBody TourTravelImpl.Model_provideTuorTravelLineOrderBudget model) {
        return tourTravelImpl.provideTuorTravelLineOrderBudget(model);
    }

    /**
     * 报名
     *
     * @param model
     * @return
     */
    @RequestMapping("/createPreTuorTravelLineOrder")
    public DataBean createPreTuorTravelLineOrder(
            @RequestBody TourTravelImpl.Model_createPreTuorTravelLineOrder model) {
        return tourTravelImpl.createPreTuorTravelLineOrder(model);
    }

    /**
     * 修改团信息
     *
     * @param model
     * @return
     */
    @RequestMapping("/updateTuorTravelLineGroup")
    public DataBean updateTuorTravelLineGroup(
            @RequestBody TourTravelImpl.Model_updateTourTravelLineGroup model) {
        return tourTravelImpl.updateTuorTravelLineGroup(model);
    }


    /**
     * 新增我的联系人
     *
     * @param model
     * @return
     */
    @RequestMapping("/createMyContactPeople")
    public DataBean createMyContactPeople(
            @RequestBody TourTravelImpl.Model_createMyContactPeople model) {
        return tourTravelImpl.createMyContactPeople(model);
    }

    /**
     * 获取我的联系人列表
     *
     * @param model
     * @return
     */
    @RequestMapping("/getMyContactPeopleList")
    public DataBean getMyContactPeopleList(
            @RequestBody TourTravelImpl.Model_getMyContactPeopleList model) {
        return tourTravelImpl.getMyContactPeopleList(model);
    }

    /**
     * 修改我的联系人信息
     *
     * @param model
     * @return
     */
    @RequestMapping("/updateMyContactPeople")
    public DataBean updateMyContactPeople(
            @RequestBody TourTravelImpl.Model_updateMyContactPeople model) {
        return tourTravelImpl.updateMyContactPeople(model);
    }

    /**
     * 删除我的联系人
     *
     * @param model
     * @return
     */
    @RequestMapping("/trashMyContactPeople")
    public DataBean trashMyContactPeople(
            @RequestBody TourTravelImpl.Model_trashMyContactPeople model) {
        return tourTravelImpl.trashMyContactPeople(model);
    }


    /**
     * 小团报名-第一步
     *
     * @param model
     * @return
     */
    @RequestMapping("/createTourTravelStep1")
    public DataBean createTourTravelStep1(
            @RequestBody TourTravelImpl.Model_createTourTravelStep1 model) {
        return tourTravelImpl.createTourTravelStep1(model);
    }

    /**
     * 计算费用
     *
     * @param model
     * @return
     */
    @RequestMapping("/calTourTravelPrice")
    public DataBean calTourTravelPrice(
            @RequestBody TourTravelImpl.Model_createTourTravelStep1 model) {
        return tourTravelImpl.calTourTravelPrice(model);
    }

    /**
     * 团报名人列表
     *
     * @param model
     * @return
     */
    @RequestMapping("/getMarkTourUserList")
    public DataBean getMarkTourUserList(
            @RequestBody TourTravelImpl.Model_getMarkTourUserList model) {
        return tourTravelImpl.getMarkTourUserList(model);
    }

    /**
     * 查询游客报的团列表
     *
     * @param model
     * @return
     */
    @RequestMapping("/getTourPlayGroupList")
    public DataBean getTourPlayGroupList(
            @RequestBody TourTravelImpl.Model_getTourPlayGroupList model) {
        return tourTravelImpl.getTourPlayGroupList(model);
    }
    /**
     * 查询用户所有得订单
     *
     * @param model
     * @return
     */
    @RequestMapping("/getUserAllOrder")
    public DataBean getUserAllOrder(
            @RequestBody TourTravelImpl.Model_getUserAllOrder model) {
        return tourTravelImpl.getUserAllOrder(model);
    }
}
